# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=lxqt-archiver
pkgver=0.9.0
pkgrel=1
pkgdesc="A simple & lightweight desktop-agnostic Qt file archiver"
arch=("loong64" "x86_64")
groups=("lxqt")
url="https://github.com/lxqt/$pkgname"
license=("GPL2")
depends=('libfm-qt' 'qt5-x11extras' 'glib2' 'json-glib' 'libfm-qt.so')
makedepends=('cmake' 'qt5-tools' 'lxqt-build-tools')
optdepends=(
  'libarchive: for handling rpm files'
)
source=("https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
sha256sums=('be2d49669220700d71b5f4a62d340eab36e29b4a8327c1f551ae95eede793158'
            'SKIP')
validpgpkeys=(
  "19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBEXECDIR=lib

  make -C build
}

package() {
  cd build

  make DESTDIR="$pkgdir" install
}
